home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / Wave / WavesWorld / Examples / graphsInSpace / variableGrid2.wwModel / model.eve
Encoding:
Text File  |  1995-04-23  |  3.3 KB  |  119 lines

  1. set time 0
  2. set duration [expr {1./60}]
  3.  
  4. set grid(width) 8
  5. set grid(depth) 3.84
  6.  
  7. set text(color) "1 1 1"
  8. set text(fontName) Helvetica
  9. set text(size) 18
  10. set text(color) "1 1 1"
  11. set text(fontName) Helvetica
  12. set text(size) 18
  13.  
  14. set dataSlice(height) 2.56
  15. animatable: {set dataSlice(depth) $grid(depth)}
  16. set dataSlice(yRotate) 180
  17. set dataSlice(zRotate) 270
  18. animatable: {set dataSlice(origin) [expr {-1 * $time}]}
  19. animatable: {set dataSlice(xTranslate) [expr {-1 * $dataSlice(height)}]}
  20. set dataSlice(yTranslate) 0
  21. animatable: {set dataSlice(zTranslate) [expr {-1 * $dataSlice(depth)}]}
  22.  
  23. proc drawGrid {w d f s c} {
  24.  
  25.   Surface paintedplastic texturename grid.tx
  26.   Patch bilinear P "0 0 0  \
  27.                     0 0 $d \
  28.                     $w 0 0 \
  29.                     $w 0 $d"
  30.   ShadingRate 1000.
  31.   Surface constant
  32.   Color $c
  33.   for {set i 0} {$i < $w} {incr i} \
  34.   {  ArchiveRecord comment "tick $i"
  35.      WW3DText $f $s $i left ;
  36.      for {set j 1} {$j < 10} {incr j} \
  37.      {  Translate .1 0 0; 
  38.         ArchiveRecord comment "tick $i.$j"
  39.         WW3DText $f [expr {.15 * $s}] $j left;
  40.      }
  41.      Translate .1 0 0; 
  42.   }
  43.   ArchiveRecord comment "tick $i"
  44.   WW3DText $f $s $i left;
  45. }
  46.  
  47. proc drawDataSlice {f s w clr yR zR xT yT zT d h dur yO time} {
  48.  
  49.     AttributeBegin
  50.       ShadingRate 1000.
  51.       Surface constant
  52.       Color 1 1 1
  53.       Rotate 90 0 1 0
  54.       Translate [expr {-1 * $d}] 0 0 
  55.       for {set i 0} {$i < $w} {incr i} \
  56.       {  WW3DText $f $s $i left;
  57.          for {set j 1} {$j < 10} {incr j} \
  58.          {  Translate 0 0 .1;
  59.             ArchiveRecord comment "tick $i.$j"
  60.             WW3DText $f [expr {.15 * $s}] $j left;
  61.          }
  62.          Translate 0 0 .1;
  63.       }
  64.       ArchiveRecord comment "tick $i"
  65.       WW3DText $f $s $i left;
  66.     AttributeEnd
  67.     Declare mapname string
  68.     Surface WWAlphaPaintedPlastic mapname dataSlice.tx
  69.     Color $clr
  70.     TransformBegin
  71.       Rotate $yR 0 1 0
  72.       Rotate $zR 0 0 1
  73.       Translate $xT $yT $zT
  74.       Translate 0 $yO 0 
  75.       Patch bilinear P "0 0 0  \
  76.                         0 0 $d \
  77.                         $h 0 0 \
  78.                         $h 0 $d"
  79.       Translate 0 [expr {-1 * $dur}] 0
  80.       #Surface paintedplastic texturename grid.tx
  81.       Patch bilinear P "0 0 0  \
  82.                         0 0 $d \
  83.                         $h 0 0 \
  84.                         $h 0 $d"
  85.     TransformEnd
  86.     Color .7 .7 .7
  87.     Surface screen
  88.     Translate $time 0 0
  89.     Patch bilinear P "0 0 0 \ 
  90.                       0 $h 0 \
  91.                       $dur 0 0 \
  92.                       $dur $h 0"
  93.     Patch bilinear P "0 $h 0 \ 
  94.                         0 $h $d \
  95.                         $dur $h 0 \
  96.                         $dur $h $d"
  97.     Patch bilinear P "0 0 $d  \
  98.                       0 $h $d \
  99.                       $dur 0 $d \
  100.                       $dur $h $d"
  101. }
  102.  
  103.  
  104.  
  105. loadControlPanel controls.nib
  106.  
  107. startShape DataSpace
  108.   #Atmosphere fog
  109.   startShape Grid
  110.     animatable: {drawGrid $grid(width) $grid(depth) $text(fontName) $text(size) "$text(color)"}
  111.   endShape  
  112.   startShape dataSlice
  113.     animatable: {drawDataSlice $text(fontName) $text(size) $grid(width) $text(color) \
  114.              $dataSlice(yRotate) $dataSlice(zRotate) \
  115.              $dataSlice(xTranslate) $dataSlice(yTranslate) $dataSlice(zTranslate) \
  116.              $grid(depth) $dataSlice(height) $duration $dataSlice(origin) $time}
  117.   endShape
  118. endShape
  119.